package kr.saeildamil.androidstudy.ch13;

import kr.saeildamil.androidstudy.R;
import android.app.Activity;
import android.os.Bundle;
import android.widget.RatingBar;
import android.widget.TextView;
import android.widget.Toast;

public class RatingBarTest extends Activity {
	RatingBar mRatingBar;
	TextView mRateText;

	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ch13_ratingbartest);

		mRatingBar = (RatingBar) findViewById(R.id.ch13_ratingbartest_ratingbar);
		mRateText = (TextView) findViewById(R.id.ch13_ratingbartest_ratetv);

		mRatingBar.setOnRatingBarChangeListener(new RatingBar.OnRatingBarChangeListener() {
			public void onRatingChanged(RatingBar ratingBar,float rating, boolean fromUser) {
				mRateText.setText("Now Rate : " + rating);
				Toast.makeText(RatingBarTest.this, "볼륨조정", Toast.LENGTH_LONG).show();
					}
				});
	}
}
